package com.example;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/demo")
public class TestController {
    @Autowired
    private FeignHelloService service;

    @GetMapping("/test")
    public String test() {
        return "123";
//        return service.hello();
    }
    
    @GetMapping("/test2")
    public String test2() {
    	User user = service.sayHello();
    	return user.getName();
    }
}

